package com.scsj.supermarket.view.activity.generalizemodel;

import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;

import com.scsj.supermarket.R;
import com.scsj.supermarket.utils.SkipUtils;
import com.scsj.supermarket.view.activity.baseactivitymodel.BaseActivity;

/**
 * 我要推广
 */
public class GeneralizeActivity extends BaseActivity implements View.OnClickListener {

    private RelativeLayout mMyRefereeRl1;
    private RelativeLayout mWantPromoteRl2;
    private RelativeLayout mMembersOfPromotionRl3;


    @Override
    protected void createView(Bundle savedInstanceState) {
        setContentView(R.layout.activity_generalize);
        //  ScreenAdapterTools.getInstance().loadView((ViewGroup)getWindow().getDecorView());
        //ScreenAdapterTools.getInstance().reset(this);//如果希望android7.0分屏也适配的话,加上这句
        initToolbar();
        setToolbarTitle("我要推广");
        hasBack(true);
        initView();
    }

    @Override
    protected void initView() {

        mMyRefereeRl1 = (RelativeLayout) findViewById(R.id.my_referee_rl1);
        mMyRefereeRl1.setOnClickListener(this);
        mWantPromoteRl2 = (RelativeLayout) findViewById(R.id.want_promote_rl2);
        mWantPromoteRl2.setOnClickListener(this);
        mMembersOfPromotionRl3 = (RelativeLayout) findViewById(R.id.members_of_promotion_rl3);
        mMembersOfPromotionRl3.setOnClickListener(this);
    }

    @Override
    protected void initListener() {

    }

    @Override
    protected void initData() {

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.my_referee_rl1://我的推荐人
                SkipUtils.toMyGeneralizeMembers(this);
                break;
            case R.id.want_promote_rl2://我要推广
                SkipUtils.toToGeneralize(this);
                break;
            case R.id.members_of_promotion_rl3://推广成员
                SkipUtils.toGeneralizeMembers(this);
                break;
            default:
                break;
        }
    }
}
